#include "sdlengine.hpp"

using namespace sdl_engine;

class TestInnerBmpFont: public App {
    void Render([[ maybe_unused ]] Renderer& render) override {
        auto& font = engine.GetInnerBmpFont();
        for (char c = '0'; c <= '9'; c++) {
            font.RenderChar(c, 8, point(8 * (c - '0'), 0), color(0, 0, 0));
        }
        for (char c = '0'; c <= '9'; c++) {
            font.RenderChar(c, 16, point(16 * (c - '0'), 16), color(0, 255, 255));
        }
        for (char c = 'a'; c <= 'z'; c++) {
            font.RenderChar(c, 24, point(24 * (c - 'a'), 32), color(0, 255, 255));
        }
        font.Render("THIS IS INNER FONT", 10, point(0, 64), color(0, 0, 0));
        font.Render("this is inner font", 10, point(0, 74), color(0, 0, 0));
    }
};

int main(int argc, char** argv) {
    TestInnerBmpFont test;

    Window::CreateInfo windowInfo;
    windowInfo.SetSize(size(720, 480))
              .SetTitle("test inner bmp font");

    engine.Init(argc, argv, windowInfo, Renderer::CreateInfo());
    engine.SetApp(&test);

    engine.SetClearColor(color(255, 255, 255));

    RUN_ENGINE();

    engine.Shutdown();
    return 0;
}
